<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>按钮动作</title>
    <link rel="stylesheet" href="bootstrap.min.css"/>
</head>
<body>
    <div class="container">
        <button type="button" data-loading-text="Loading for 3 seconds..." class="btn btn-primary js-loading-btn">Loading</button>
        <button type="button" class="btn btn-default" data-toggle="button" autocomplete="off">Hello</button>
        <br/>
        <br/>
        <div class="btn-group" data-toggle="buttons">
            <label class="btn btn-primary active">
                <input type="checkbox" autocomplete="off" checked/>选择1
            </label>
            <label class="btn btn-primary">
                <input type="checkbox" autocomplete="off" checked/>选择2
            </label>
            <label class="btn btn-primary">
                <input type="checkbox" autocomplete="off" checked/>选择3
            </label>
        </div>
        <br/>
        <br/>
        <div class="btn-group" data-toggle="buttons">
            <label class="btn btn-primary active">
                <input type="radio" name="options" autocomplete="off" checked/>单选1
            </label>
            <label class="btn btn-primary">
                <input type="radio" name="options" autocomplete="off" />单选2
            </label>
            <label class="btn btn-primary">
                <input type="radio" name="options" autocomplete="off" />单选3
            </label>
            <label class="btn btn-primary">
                <input type="radio" name="options" autocomplete="off"/>单选4
            </label>
        </div>
        <br/>
        <br/>
        <button type="button" data-complete-text="finish" class="btn btn-default mybtn" autocomplete="off">hello</button>
    </div>
    <script src="jquery-1.11.1.js"></script>
    <script src="bootstrap.min.js"></script>
    <script>
        $(".js-loading-btn").on("click",function(e){
            var btn = $(this).button("loading");
            setTimeout(function(e){
                btn.button("reset")
            },3000)
        })

        $(".mybtn").on("click",function(e){
            $(this).button("complete");
        })
    </script>
</body>
</html>